<template>
  <view>
    <custom-navbar title="个人中心" :left-icon="false" backgrourd-color="#fff" />

    <view class="head">
      <text class="iconfont icon-wode" />
      <text class="color1 login">
        点我登录
      </text>
      <text class="color2">
        累计打卡7天
      </text>
      <text class="color2">
        积累了: 20个努力值
      </text>
    </view>

    <view v-for="item of menu" :key="item.title">
      <text class="menu-title">
        {{ item.title }}
      </text>

      <view class="menu">
        <view v-for="son of item.children" :key="son.name" class="row" @tap="pageSkip(son.url)">
          <view class="row-box">
            <image class="image" src="~@/static/img/task.png" />
            <text>{{ son.name }}</text>
          </view>
        </view>
      </view>
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {

      menu: [
        {
          title: "主要功能",
          children: [
            {
              name: "发布任务",
              url: "/pages/task/add/index"
            },
            {
              name: "快速选择",
              url: "/pages/task/taskChoose/search/index"
            },
            {
              name: "任务类型",
              url: "/pages/taskType/search/index"
            },
            {
              name: "图表",
              url: "/pages/statistics/index"
            },
          ]
        },
        {
          title: "辅助功能",
          children: [
            {
              name: "系统设置",
              url: "/pages/set/search/index"
            }
          ]

        },

      ]
    };
  },
  methods: {
    pageSkip(url) {
      uni.navigateTo({ url })
    },
  }
}
</script>
<style src="./index.scss" lang="scss" scoped></style>

